// 导入axios
import axios from 'axios'
// 导入token
import { getToken } from '../utils/token'
// 创建
const request = axios.create({
  baseURL: 'http://localhost:8000'
})
// 抽取方法
const userInfo = () => {
  return request({
    url: '/v1_0/user/profile',
    method: 'get',
    headers: {
      Authorization: `Bearer ${getToken().token}`
    }
  })
}
// 暴露
export { userInfo }
